import com.sun.org.apache.xml.internal.security.exceptions.Base64DecodingException;
import com.sun.org.apache.xml.internal.security.utils.Base64;
import org.springframework.security.authentication.BadCredentialsException;

import java.nio.charset.StandardCharsets;

public class GetAuthorization {

    public static void main(String[] args) {
        String s = "internet_plusinternet_plus";

        byte[] bytes = s.getBytes(StandardCharsets.UTF_8);
        String encode;
        encode = Base64.encode(bytes);
        System.out.println(encode);
    }
}
